package com.a01_2021.thousandstimes.general.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.general.entity.PersonnelInfomation;
import com.a01_2021.thousandstimes.general.entity.SysUser;
import com.a01_2021.thousandstimes.saas.entity.vo.InforQuery;
import com.a01_2021.thousandstimes.utils.AjaxResponse;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.HashMap;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author FRQ
 * @since 2021-02-22
 */
public interface PersonnelInfomationService extends IService<PersonnelInfomation> {

    AjaxResponse insertInfo(InforQuery inforQuery);

    HashMap<String, String> uploadResume(String instanceId, long userId, MultipartFile file) throws CustomException, IOException;

    PersonnelInfomation updateInfo(long userId, PersonnelInfomation personnelInfomation) throws CustomException;

    String getName(long userId) throws CustomException;

    PersonnelInfomation getByUserId(long userId);

    PersonnelInfomation getByUserIdOriginal(long userId);

    @DS("master")
    long updatePersonalInformationToMaster(PersonnelInfomation personnelInfomation, SysUser sysUser);
}
